package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 员工角色
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tm_employee_role")
public class EmployeeRolePO extends DMSBasePO<EmployeeRolePO> {

    private static final long serialVersionUID = 1L;

    /**
     * EMPLOYEE_ROLE_ID
     */
        @TableId(value = "EMPLOYEE_ROLE_ID", type = IdType.AUTO)
        private Integer employeeRoleId;
    /**
     * 经销商代码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * EMPLOYEE_ID
     */
    @TableField("EMPLOYEE_ID")
    private Integer employeeId;
    /**
     * 是否销售顾问,是否试车员,是否服务顾问,是否技师,是否可以领料,是否检验员,是否保险专员,是否续保专员,是否定保专员,是否装潢专员,是否DCRC专员
     */
    @TableField("ROLE")
    private Integer role;
    @TableField("ORGANIZATION_ID")
    private Integer organizationId;
    @TableField("IS_DELETED")
    @Version
    private Boolean isDeleted;

    public EmployeeRolePO() {
        super();
    }


    public Integer getEmployeeRoleId() {
        return employeeRoleId;
    }

    public void setEmployeeRoleId(Integer employeeRoleId) {
        this.employeeRoleId = employeeRoleId;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public Integer getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Integer employeeId) {
        this.employeeId = employeeId;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Integer getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.employeeRoleId;
    }

    @Override
    public String toString() {
        return "EmployeeRolePO{" +
        "employeeRoleId=" + employeeRoleId +
        ", dealerCode=" + dealerCode +
        ", employeeId=" + employeeId +
        ", role=" + role +
        ", organizationId=" + organizationId +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "employeeRoleId");
    }


}
